<?php
/**
 * WebException class
 *
 */
class WebException extends Exception
{
	protected $level = 0;
	
	/**
	 * WebException Constructor
	 *  
	 * @param string $message
	 * @param int $code
	 * @param int $level
	 */
    public function __construct($message, $code = 0, $level = 0) {
    	$this->level = $level;
        parent::__construct($message, $code);
    }

    public function __toString() {
        return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
    }

    final function getLevel()
    {
    	return $this->level;
    }    
}